using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BHXH.LinqRepository 
{
    public class CoQuanRepository : Repository<CoQuan>
    {
       

       
        public CoQuan GetByID(Guid Id)
        {
            return dataContext.CoQuans.Where(c => c.ID == Id).FirstOrDefault();
        }
        public CoQuan GetByTen(string ten)
        {
            return dataContext.CoQuans.Where(c => c.Ten == ten).FirstOrDefault();
        }
        public void InsertOne(CoQuan one)
        {
            one.ID = Guid.NewGuid();
            dataContext.CoQuans.InsertOnSubmit(one);
        }
        public void SubmitChanges()
        {
            dataContext.SubmitChanges();
        }
        public void EditOne(CoQuan one)
        {
            //Update(one);
        }
    }
}
